import request from '@/utils/request'

export default {
  updatePass(params) {
    return request({
      url: '/admin/sysUser/password',
      method: 'post',
      params,
    })
  },
  findFromUserID() {
    return request({
      url: '/admin/sysUser/findFromUserID',
      method: 'post'
    })
  },
  path() {
    return request({
      url: '/user/role/path',
      method: 'post',
    })
  },
  findUserIdByRoleId() {
    return request({
      url: '/admin/sysUser/findUserIdByRoleId',
      method: 'post',
    })
  },
  backUser(params) {
    return request({
      url: '/admin/sysUser/backUser',
      method: 'post',
      params
    })
  },
  updatePassword(params) {
    return request({
      url: '/admin/sysUser/passwordReset',
      method: 'post',
      params,
    })
  },
  homeList(params) {
    return request({
      url: '/home/yearAim',
      method: 'post',
      params
    })
  },
  getList(params) {
    return request({
      url: '/admin/sysUser/listByRole',
      method: 'post',
      params
    })
  },
  getRoleList(params) {
    return request({
      url: '/user/role/list',
      method: 'post',
      params
    })
  },
  addUser(data) {
    return request({
      url: '/admin/sysUser/add',
      method: 'post',
      data
    })
  },
  get(params) {
    return request({
      url: '/admin/sysUser/get',
      method: 'post',
      params
    })
  },
  getByUserId(params) {
    return request({
      url: '/admin/sysUser/getByUserId',
      method: 'post',
      params
    })
  },
  updateUser(data) {
    return request({
      url: '/admin/sysUser/update',
      method: 'post',
      data
    })
  },
  remove(params) {
    return request({
      url: '/admin/sysUser/remove',
      method: 'post',
      params
    })
  },
  cleanUser(params) {
    return request({
      url: '/admin/sysUser/cleanUser',
      method: 'post',
      params
    })
  },
  export(params) {
    return request({
      url: '/admin/stat/export',
      method: 'post',
      params,
      responseType: 'blob'
    })
  },
}
